package com.dg11185.nearshop.baidumap;

import java.util.HashMap;
import java.util.Map;

import com.android.nearshop.R;
import com.baidu.mapapi.model.LatLng;

public class MapConstant {

    public final static int OFFLINE_CITY_ID = 119; // 离线地图编号，现在为东莞

    /** 数据缓存相关常量 */
    public final static String dataShopInfoForMap = "shop_info_for_map";// 传递商家数据，查找商家路径

    public static LatLng getDefaultPoint() {
        return new LatLng(23.029189, 113.75826);
    }

    public final static String[] industrys = new String[] { "全部分类", "餐饮美食", "休闲娱乐", "美容美发", "购物服务", "周边游乐", "便民服务",
            "其他" };

    public static Map<String, String> getIndustryMap() {
        Map<String, String> map = new HashMap<String, String>();
        map.put("餐饮美食", "100");// 餐饮美食
        map.put("休闲娱乐", "101");// 休闲娱乐
        map.put("美容美发", "102");// 美容美发
        map.put("购物服务", "103");// 购物服务
        map.put("周边游乐", "104");// 周边游乐
        map.put("便民服务", "105");// 便民服务
        map.put("其他", "106");// 其他
        return map;
    }

    public static Map<String, Integer> getIndustryIconMap() {
        Map<String, Integer> map = new HashMap<String, Integer>();
        map.put("100", R.drawable.map_category_food);// 餐饮美食
        map.put("101", R.drawable.map_category_play);// 休闲娱乐
        map.put("102", R.drawable.map_category_hair);// 美容美发
        map.put("103", R.drawable.map_category_shop);// 购物服务
        map.put("104", R.drawable.map_category_travel);// 周边游乐
        map.put("105", R.drawable.map_category_service);// 便民服务
        map.put("106", R.drawable.map_category_other);// 其他
        return map;
    }

    public static int getIndustryIconId(String industryId){
        Integer iconId = 106;
        if(industryId==null || "".equals(industryId)){
        }else if(industryId.length() < 3){
        }else{
            iconId = getIndustryIconMap().get(industryId.substring(0, 3));
            if(iconId == null){
                iconId = 106;
            }
        }
        return iconId;
    }
}
